package homework.two;

import homework.two.Pay;

public class Zfb extends Pay {
    double M =5000;
    @Override
    public void pay(double money) {
        if(M>money){
            System.out.println("Zfb支付了"+money+"元");
            M -= money;
            System.out.println("余额还有"+M+"元");
        }
        else{
            System.out.println("余额不足");
        }
    }
}
